{% extends "base_worklist.html" %}
{%block title%}
{{s.aciklama}} (içerik)
{%endblock%}

{% load adminmedia %}

{%block content%}
	{% load work_custom_filters  %}
	{% if form %}
		    {% if form.errors %}
		        <p style="color: red;">
		           Bilgilerinizde hata var.. Lütfen Düzeltin ({{ form.errors|length }}).
		        </p>
		    {% endif %}
			<div style="width:1000px; margin-left: auto; margin-right: auto;">
			<fieldset class="module aligned ">
				<div class="form-row category  ">
				    <form action="/worklist/sabitler/{{ s.id }}/{% if form.id.data  %}{{ form.id.data }}{% else  %}{{ "0" }}{% endif %}/kaydet/" method="POST">
				  
				       <table style="width: 1000px;">
				       <caption class="section"><br>{{s.aciklama}}</caption>	
				       
				       <tbody>
				                 
				                  {{ form }}
				       
				       
				       </tbody>
				   
				      </table>
				  	   <div class="submit-row" >
							<input type="submit" value="Kaydet" onclick="this.disabled=true;this.value='ekliyor..';this.form.submit();" class="default" name="_save" />
					  		<input type="submit" value="Kaydet ve düzenlemeye devam et" name="_continue" />
					   </div>
				    </form>
				</div>
			</fieldset>
			</div>	
	{% endif %}
	
	{%if cihazform %}
	
		
	<div style="width:1000px; margin-left: auto; margin-right: auto;">
	<fieldset class="module aligned ">
		<div class="form-row category  ">
				
		    <form action="/worklist/sabitler/{{ s.id }}/{% if cihazform.id.data  %}{{ cihazform.id.data }}{% else  %}{{ "0" }}{% endif %}/kaydet/" method="POST">
			<!--  <label for="id_name">Eklemek İstediğiniz Etiketi Giriniz&nbsp;:</label>
		          -->  
			{{cihazform.id}}
			<table style="width: 1000px; vertical-align: middle;">
			<caption class="section">{{s.aciklama}}</caption>
       		  <tbody>
       		  <tr>
       		  	<td><label>Sıra no&nbsp;:</label></td>
       		  	<td><label class="required">Açıklama&nbsp;:</label></td>
       		  	<td><label>Bulunduğu&nbsp;Birim&nbsp;:</label></td>
       		  </tr>
       		  <tr>
       		  	<td>{{cihazform.sno}}{% if cihazform.sno.errors %}<small>{{cihazform.sno.errors}}</small>{%endif%}</td>
       		  	<td>{{cihazform.aciklama}}{% if cihazform.aciklama.errors %}<small>{{cihazform.aciklama.errors}}</small>{%endif%}</td>
       		  	<td>{{cihazform.lokasyon_id}}{% if cihazform.lokasyon_id.errors %}<small>{{cihazform.lokasyon_id.errors}}</small>{%endif%}</td>
       		  </tr>
       		  <tr>
       		  	<td><label>Markası :</label>{{cihazform.markasi_id}}{% if cihazform.markasi_id.errors %}<small>{{cihazform.markasi_id.errors}}</small>{%endif%}</td>
       		  	<td><label>Modeli :</label>{{cihazform.modeli}}{% if cihazform.modeli.errors %}<small>{{cihazform.modeli.errors}}</small>{%endif%}</td>
       		  	<td><label>Demirbaş No :</label>{{cihazform.demirbasno}}{% if cihazform.demirbasno.errors %}<small>{{cihazform.demirbasno.errors}}</small>{%endif%}</td>
       		  </tr>
       		  <tr>
       			<td><label>Seri No :</label>{{cihazform.serino}}{% if cihazform.serino.errors %}<small>{{cihazform.serino.errors}}</small>{%endif%}</td>
       			<td><label>Barkod :</label>{{cihazform.barkod}}{% if cihazform.barkod.errors %}<small>{{cihazform.barkod.errors}}</small>{%endif%}</td>  
       			<td><label class="required">Aidiyeti :</label>{{cihazform.aidiyet_id}}{% if cihazform.aidiyet_id.errors %}<small>{{cihazform.aidiyet_id.errors}}</small>{%endif%}</td>
       		  </tr>
       		  <tr>
       		  	<td><label>Yetkili Servisi :</label>{{cihazform.yetkili_servisi_id}}{% if cihazform.yetkili_servisi_id.errors %}<small>{{cihazform.yetkili_servisi_id.errors}}</small>{%endif%}</td>
       		  	<td><label>Garanti Süresi&nbsp;:</label>{{cihazform.garanti_bitis_tarihi}}&nbsp;<a href="javascript:NewCssCal('id_garanti_bitis_tarihi','yyyymmdd','arrow',true,24,false)"><img src="/media/images/cal.gif" width="16" height="16" alt="Tarih seçiniz"></a>{% if cihazform.garanti_bitis_tarihi.errors %}<small>{{cihazform.garanti_bitis_tarihi.errors}}</small>{%endif%}</td>
              	<td><label>Alınış Tarihi&nbsp;:</label>{{cihazform.cihaz_alinis_tarihi}}&nbsp;<a href="javascript:NewCssCal('id_cihaz_alinis_tarihi','yyyymmdd','arrow',false,24,false)"><img src="/media/images/cal.gif" width="16" height="16" alt="Tarih seçiniz"></a>{% if cihazform.cihaz_alinis_tarihi.errors %}<small>{{cihazform.cihaz_alinis_tarihi.errors}}</small>{%endif%}</td>
              </tr>
       		  <tr>
       		    <td><label class="required">Durumu :</label>{{cihazform.durum_id}}{% if cihazform.durum_id.errors %}<small>{{cihazform.durum_id.errors}}</small>{%endif%}</td>                                           
       		    <td colspan="2"><label>Ek açıklama :</label>{{cihazform.eknot}}{% if cihazform.eknot.errors %}<small>{{cihazform.eknot.errors}}</small>{%endif%}</td>
       		  </tr>
       		  {% ifequal ekcihazlist|length 0 %}
       		  <tr>
       		  	<td colspan="3">
       		  	<label>Bağlı Olduğu Cihaz var mı? :</label>{{cihazform.parent_id}}{% if cihazform.parent_id.errors %}<small>{{cihazform.parent_id.errors}}</small>{%endif%}
       		  	{% if cihazform.parent_id.data %}
       		  	<a href = "/worklist/sabitler/{{ s.id }}/{{cihazform.parent_id.data}}/degistir/"><img title="Cihaza git" alt="Cihaza git" src="/media/images/go.gif"></img></a>
       		  	{% endif %}
       		  	</td>
       		  </tr>
       		  {% endifequal %}
       		  </tbody>
       		  </table>
       		 
        	  <div class="submit-row" >
				<input type="submit" value="Kaydet" onclick="this.disabled=true;this.value='ekliyor..';this.form.submit();" name="_save" /></form>
				<input type="submit" value="Kaydet ve düzenlemeye devam et" name="_continue" />
  		    	</form>
  		    	<input type="button" value="Cihaz kartını bas" onclick="window.open('/worklist/sabitler/{{ s.id }}/{{cihazform.id.data}}/rapor/goster/','kart', 'toolbar=no'); return 0;" class="default"/>
  		    	<p class="deletelink-box"><a href="/worklist/sabitler/{{ s.id }}/">Cihaz Listesine geri dön</a></p>
								 		    	
  		    </div>
			
       		   
		    
		</div>
	</fieldset>
	</div>
	<div style="width:1100px; margin-left: auto; margin-right: auto;">
				<ul class="tabset_tabs">
				   {% if git %}
					   <li class="tabset_tabs"><a href="#tab1" {%ifequal git "tab1"%}class="active" {%endifequal%}>Ek Cihazlar</a></li>
					   <li class="tabset_tabs"><a href="#tab2" {%ifequal git "tab2"%}class="active" {%endifequal%}>Bakım Planları</a></li>
					   <li class="tabset_tabs"><a href="#tab3" {%ifequal git "tab3"%}class="active" {%endifequal%}>Bakım Formları</a></li>
					   <li class="tabset_tabs"><a href="#tab4" {%ifequal git "tab4"%}class="active" {%endifequal%}>İş istekleri</a></li>
					   <li class="tabset_tabs"><a href="#tab5" {%ifequal git "tab5"%}class="active" {%endifequal%}>İlgili Belge/Dosyalar</a></li>
				   {% else %}
				   	   <li class="tabset_tabs"><a href="#tab1">Ek Cihazlar</a></li>
					   <li class="tabset_tabs"><a href="#tab2" class="active">Bakım Planları</a></li>
					   <li class="tabset_tabs"><a href="#tab3">Bakım Formları</a></li>
					   <li class="tabset_tabs"><a href="#tab4">İş istekleri</a></li>
					   <li class="tabset_tabs"><a href="#tab5">İlgili Belge/Dosyalar</a></li>
				  {% endif %}
				</ul>
				<div id="tab1" class="tabset_content">
				
					<div style="width:1000px; margin-left: auto; margin-right: auto;">
					<fieldset class="module aligned ">
						<div class="form-row category  ">
					
						<table style="width: 1000px;">
							<caption class="section"><br/>{{cihazform.aciklama.data}} cihazına ait aksesuar/ek cihazlar<br>&nbsp;</caption>
							<tbody>
							<tr>
								<td style="width: 640px;" colspan="8"><label>Cihazlar&nbsp;:</label>{{ekcihazform.cihaz_id}}&nbsp;<a href="javascript:void(0);" onclick="ekle()" class="addlink">Ekleme</a></td>
							</tr>
							
							
							{% if ekcihazlist %}
							{% for ekcih in ekcihazlist %}
							
								<tr>
									<td><b>{{forloop.counter}}</b></td><td><a href="/worklist/sabitler/{{ s.id }}/{{ekcih.id }}/degistir/">{{ekcih.aciklama|dotsifempty}}</a></td><td><b>Marka:</b> {{ekcih.markasi.aciklama|dotsifempty}}</td><td><b>Model:</b> {{ekcih.modeli|dotsifempty}}</td><td><b>Seri: </b>{{ekcih.serino|dotsifempty}}</td><td><b>Dem.No: </b>{{ekcih.demirbasno|dotsifempty}}</td><td><b>Gar.Tar: </b>{{ekcih.garanti_bitis_tarihi|dotsifempty}}</td><td><a href="kaldir/?cid={{ekcih.id}}"><img alt="Çıkar" src="/media/images/delete.png"/></a></td>  
	 							</tr>
								
							{% endfor %}
							{% endif %}
							
							</tbody>
						</table>
					
						</div>
					</fieldset>
					</div>
					
				</div>
				<div id="tab2" name="tab2" class="tabset_content">
				   
				    <div style="width:1000px; margin-left: auto; margin-right: auto;">
					<fieldset class="module aligned ">
						<div class="form-row category ">
							<form action="/worklist/sabitler/{{ s.id }}/{{ cihazform.id.data }}/program_ekle/{% if bakim_id %}?bakim_id={{bakim_id}}{%endif %}" method="POST">
							<table style="width: 1000px;">
							<caption class="section">{{cihazform.aciklama.data}} cihazına ait Bakım Planları</caption>
								<tbody>
									<thead>
										<th>Açıklama</th>
										<th>Tür</th>
										<th>Atölye</th>
										<th>Baş.Tarihi</th>
										<th>Bit.Tarihi</th>
										<th>Tüm Gün?</th>
									</thead>
									<tr>
										<td>{{bakimform.aciklama}}{% if bakimform.aciklama.errors %}<br>{{bakimform.aciklama.errors}}{%endif%}</td>
										<td>{{bakimform.turu}}{% if bakimform.turu.errors %}<br>{{bakimform.turu.errors}}{%endif%}</td>
										<td>{{bakimform.atolye}}{% if bakimform.atolye.errors %}<br>{{bakimform.atolye.errors}}{%endif%}</td>
										<td>{{bakimform.planlanan_baslangic_tarihi}}&nbsp;<a href="javascript:NewCssCal('id_planlanan_baslangic_tarihi','yyyymmdd','arrow',true,24,false)"><img src="/media/images/cal.gif" width="16" height="16" alt="Pick a date"></a>{%if bakimform.planlanan_baslangic_tarihi.errors %}<br>{{bakimform.planlanan_baslangic_tarihi.errors}}{%endif%}</td>
										<td>{{bakimform.planlanan_bitis_tarihi}}&nbsp;<a href="javascript:NewCssCal('id_planlanan_bitis_tarihi','yyyymmdd','arrow',true,24,false)"><img src="/media/images/cal.gif" width="16" height="16" alt="Pick a date"></a>{%if bakimform.planlanan_bitis_tarihi.errors %}<br>{{bakimform.planlanan_bitis_tarihi.errors}}{%endif%}</td>
										<td>{{bakimform.tumgun}}</td>
									</tr>
								</tbody>
							</table>
							<div class="submit-row" >
								{%if bakim_id %}
								<p class="deletelink-box"><a href="/worklist/sabitler/{{ s.id }}/{{ cihazform.id.data }}/program/{{bakim_id}}/sil/" class="deletelink">Sil</a></p>
								<input type="submit" value="Kaydet" name="_save" />
								{% endif %}
								<input type="submit" value="Ekle" class="default" name="_add" />
							</div>
							</form>
							</div>
						</div>
						<div style="width:1000px; margin-left: auto; margin-right: auto;">
						<div class="form-row category  "> 
						     <table style="width: 1000px;">
						     
							 <tbody>
							<!-- <form action="/worklist/sabitler/{{ s.id }}/{{ cihazform.id.data }}/program_ekle/" method="POST">
						   			<tr><td colspan="6">Başlık&nbsp;:&nbsp;{{bakimform.baslik}}&nbsp;Türü&nbsp;:&nbsp;{{bakimform.turu}}&nbsp;Atölye&nbsp;:&nbsp;{{bakimform.atolye}}</td></tr>
						   			<tr>
							   			<td colspan="5">Başlangıç&nbsp;:&nbsp;{{bakimform.planlanan_baslangic_tarihi}}&nbsp;<a href="javascript:NewCssCal('id_planlanan_baslangic_tarihi','yyyymmdd','arrow',true,24,false)"><img src="/media/images/cal.gif" width="16" height="16" alt="Pick a date"></a>&nbsp;Bitiş&nbsp;:&nbsp;{{bakimform.planlanan_bitis_tarihi}}&nbsp;<a href="javascript:NewCssCal('id_planlanan_bitis_tarihi','yyyymmdd','arrow',true,24,false)"><img src="/media/images/cal.gif" width="16" height="16" alt="Pick a date"></a>&nbsp;Tüm Gün?&nbsp;:&nbsp;{{bakimform.tumgun}}
							   			</td>
							   			<td>
							   			<input type="submit" value="Oluştur" onclick="this.disabled=true;this.value='ekliyor..';this.form.submit();" class="default" name="_save" />
							   			</form>
										</td>
									</tr>
						   	</form>-->
						   			<thead>
										<th>Sıra</th>
										<th>Açıklama</th>
										<th>Sorumlu Birim</th>
										<th>Türü</th>
										<th colspan="2">Baş. - Bit.Tarihi</th>
										
									</thead>
						   			{% if bakimlist %}
									{% for bakim in bakimlist %}
									
										<tr>
											<td colspan="1"><b>{{forloop.counter}}</b></td>
											<td>{%if bakim.id|getbakimtablo %}<a href ="javascript:void(0);" onclick="PopupCenter('worklist/sabitler/{{ s.id }}/{{ cihazform.id.data }}/bakimform/{{bakim.id|getbakimtablo_id}}/goster/','{{bakim.aciklama}} - Bakim Formu',650,600);"><u>{{bakim.aciklama|dotsifempty}}</u></a>{%else%}{{bakim.aciklama|dotsifempty}}{%endif%}</td>
											<td colspan="1">{{bakim.atolye.aciklama}}</td>
											<td>{{bakim.turu.aciklama|dotsifempty}}</td>
											<td><a href="javascript:void(0);" onclick="PopupCenter('worklist/ajanda/?month={{bakim.planlanan_baslangic_tarihi.month}}&year={{bakim.planlanan_baslangic_tarihi.year}}', 'Ajanda',980,720);">{{bakim.planlanan_baslangic_tarihi|date:"d/M/Y"|dotsifempty}}<b> - </b>{{bakim.planlanan_bitis_tarihi|date:"d/M/Y"|dotsifempty}}</a></td>
											<td><a href="/worklist/sabitler/{{ s.id }}/{{ cihazform.id.data }}/program/{{bakim.id}}/goster/"><img title="Değiştir" height="30%" width="30%" src="/media/images/edit_file.gif"/></a></td>
			 							</tr>
										
									{% endfor %}
									{% endif %}
						   	 </tbody>
						   	 </table>
						
						</div>
				
						</fieldset>
					</div>
	
				</div>
				<div id="tab3" class="tabset_content">
					 <div style="width:1000px; margin-left: auto; margin-right: auto;">
					    <fieldset class="module aligned ">
					    	<div class="form-row category  "> 
					    		<table style="width: 1000px;">
									<caption class="section"><br/>{{cihazform.aciklama.data}} cihazına ait Bakım Formları<br>&nbsp;</caption>
									<tbody>
										<tr>
										<td colspan="5" style="vertical-align: middle;">Kayıtlı&nbsp;Taslaklar&nbsp;(<a href="/worklist/sabitler/{{ s.id }}/{{cihazform.id.data}}/degistir/?git=tab3"><img title="Güncelle" src="/media/images/refresh.png"/></a>)&nbsp;:
										<select name="kayitli_taslaklar" id="id_kayitli_taslaklar">
											<option value="" selected="selected">---------</option>
											{% for taslak in bakimtaslaklar %}
											<option value="{{taslak.id}}">{{taslak.aciklama}}</option>
										    
											{% endfor %}
										</select>
											<a href ="javascript:void(0);" onclick="bakimformtaslaktanekle();"><img alt="Taslaktan Bakım Formu Oluştur" title="Taslaktan Bakım Formu Oluştur" src="/media/images/go.gif"></img></a>&nbsp;
       		  								<a href="javascript:void(0);" onclick="bakimformtaslakedit('', 'Bakim Form Taslak Oluştur',650,600);" class="changelink">Seçili Taslağı Değiştir</a>
       		  								<a href="javascript:void(0);" onclick="bakimformtaslak('worklist/sabitler/bakim/taslak/olustur/', 'Bakim Form Taslak Oluştur',650,600);" class="addlink">Bakim Form Taslağı oluştur</a>
       		  							</td>
										</tr>
										{% if bakimtabloz %}
										{% for tablo in bakimtabloz %}
										
										<tr>
											<td colspan="1" style="vertical-align: middle;"><b>{{forloop.counter}}</b></td><td style="vertical-align: middle;"><a href="javascript:void(0);" onclick="PopupCenter('worklist/sabitler/{{ s.id }}/{{ cihazform.id.data }}/bakimform/{{tablo.id}}/goster/','{{tablo.aciklama}} - Bakim Formu',650,600);">{{tablo.aciklama|dotsifempty}}</a></td><td colspan="1" style="vertical-align: middle;">{% if tablo.islistesi %}<b>{% ifequal tablo.islistesi.id "4" %}Bakım{%else%}Kalib.{%endifequal%}&nbsp;:</b> {{tablo.islistesi.aciklama.capitalize}}&nbsp;[&nbsp;{{tablo.islistesi.planlanan_baslangic_tarihi|date:"F"}}/{{tablo.islistesi.planlanan_baslangic_tarihi.year}}&nbsp;]{%else%}--Henüz atanmamış--{%endif%}</td><td colspan="1" style="vertical-align: middle;"><b>Kul.&nbsp;:</b>&nbsp;{{tablo.kullanici}}</a></td><td colspan="1" style="vertical-align: middle;"><b>Onay&nbsp;Durumu&nbsp;:</b>&nbsp;{%ifequal tablo.onaylandi False %}<img title="Onaysız" src="/media/images/delete.png"/>&nbsp;<font color="blue">|</font>&nbsp;<a href="javascript:void(0);" onclick="PopupCenter('worklist/sabitler/{{ s.id }}/{{ cihazform.id.data }}/bakimform/{{tablo.id}}/goster/?Sil=E','{{tablo.aciklama}} - Bakim Formu',650,600);"><img title="Sil" height="10%" width="10%" src="/media/images/delete_file.png"/></a>{%else%}<img title="Onaylı" src="/media/images/checked.gif"/>{%endifequal%}</td>  
				 						</tr>
											
										{% endfor %}
										{% endif %}
									</tbody>
							    </table>
					    	</div>
					    </fieldset>
					 </div>
				</div>

				<div id="tab4" class="tabset_content">
					 <div style="width:1000px; margin-left: auto; margin-right: auto;">
					    <fieldset class="module aligned ">
					    	<div class="form-row category  "> 
					    		<table style="width: 1000px;">
									<caption class="section"><br/>{{cihazform.aciklama.data}} cihazına ait açılmış işler<br>&nbsp;</caption>
									<tbody>
										
										<thead>
										<th>#</th>
										<th>iş Türü</th>
										<th>Lokasyon</th>
										<th>Atölye</th>
										<th>İşlem Durumu</th>
										<th>Kullanıcı</th>
										<th>Tarih</th>
										<th>Onaylandı</th>
										
										</thead>
										{% if cihaz_islist %}
										{% for isl in cihaz_islist %}
										<tr>
											<td colspan="1" style="vertical-align: middle;"><b>{{forloop.counter}}</b></td><td style="vertical-align: middle;">{{isl.turu}}</td><td style="vertical-align: middle;">{{isl.lokasyon}}</td><td style="vertical-align: middle;">{{isl.atolye}}</td><td style="vertical-align: middle;"><b><a href="/worklist/isistek/{{isl.id}}/duzenle/">{{isl.islem_durum}}</a></b></td><td style="vertical-align: middle;">{{isl.kullanici}}</td><td style="vertical-align: middle;">{{isl.timestamp}}</td><td colspan="1" style="vertical-align: middle;">{%ifequal isl.onaylandi False %}<img src="/media/images/delete.png"/>{%else%}<img src="/media/images/checked.gif"/>{%endifequal%}</td>  
				 						</tr>
											
										{% endfor %}
										{% endif %}
									</tbody>
							    </table>
					    	</div>
					    </fieldset>
					 </div>
				</div>
				<div id="tab5" class="tabset_content">
					 <div style="width:1000px; margin-left: auto; margin-right: auto;">
					    <fieldset class="module aligned ">
					    	<div class="form-row category  "> 
					    
								<table style="width: 1000px;">
									<caption class="section">{{cihazform.aciklama.data}} cihazına ait belgeler</caption>
									<tbody>
										<thead>
											<th>Açıklama</th>
											<th>Dosya Yolu</th>
										</thead>
										<tr style="vertical-align: middle;">
											<td width="75%"><!-- {{documentform.aciklama}} -->
											<input id="id_aciklama_belge" size="100" name="aciklama" maxlength="250" type="text">
											</td>
											<td width="25%">
											<span id="spanButtonPlaceholder1"></span>
											&nbsp;<input id="btnCancel1" type="button" value="Durdur" onclick="cancelQueue(upload1);" disabled="disabled" style="display:none; vertical-align: top; margin-left: 2px; height: 22px; font-size: 8pt;" />
											&nbsp;<a href="/worklist/sabitler/{{ s.id }}/{{cihazform.id.data}}/degistir/?git=tab5"><img title="Güncelle" src="/media/images/refresh.png"/></a>
											
											</td>
											<!-- <td width="25%">{{documentform.document}}</td> -->
										</tr>
										
									</tbody>
								</table>
								<div class="submit-row" >
								<div class="fieldset flash" id="fsUploadProgress1">
								
								</div>
								<!--	{%if belge_id %}
									<p class="deletelink-box"><a href="/worklist/sabitler/{{ s.id }}/{{ cihazform.id.data }}/belge/{{belge_id}}/sil/" class="deletelink">Sil</a></p>
									<input type="submit" value="Kaydet" name="_save" />
									{% endif %}
									<input type="submit" value="Ekle" class="default" name="_add" />-->
								</div>
							
							</div>
						</fieldset>
						<fieldset class="module aligned ">
					    	<div class="form-row category  "> 
					    		<table style="width: 1000px;">
									<tbody>
										<thead>
											<th>#</th>
											<th>Açıklama</th>
											<th>Dosya Yolu</th>
											<th>Kullanıcı</th>
											<th colspan="3">Eklenme Tarihsaat</th>
											
										</thead>
										{% if doclist %}
										<form enctype="multipart/form-data" action="/worklist/sabitler/{{ s.id }}/{{ cihazform.id.data }}/belgeler/degistir/" method="POST">
											{% for doc in doclist %}
												<tr>
													<th>{{forloop.counter}}</th>
													<td>{{doc.aciklama}}</td>
													<td><a href="{{doc.document.url}}" target="_new">{{doc.document.url }}</a></td>
													<td>{{doc.kullanici}}</td>
													<td>{{doc.timestamp}}</td>
													<td><a href="/worklist/sabitler/{{ s.id }}/{{ cihazform.id.data }}/belge/{{doc.id}}/sil/">Sil&nbsp;<img src="/media/images/icon_deletelink.gif"/></a></td>
													<td><input type="checkbox" name="node" value="{{doc.id}}"/></td>
												</tr>
											{% endfor %}
										{%else%}
										<tr>
											<td colspan="6"><p class="help">---Kayıt bulunamadı---</p></td>
										</tr>
										{% endif %}
									</tbody>
								</table>
								{% if doclist %}
								
									<div class="submit-row" >
									 {{documentform.cihaz}} 
									<input type="submit" value="Sadece Taşı" name="_tasi" />
									<input type="submit" value="Kopyala ve Taşı" name="_kopyalatasi" />
									<input type="submit" value="Seçilileri Sil" class="default" name="_coklusil" />
									</div>
								</form>
								{% endif %}
					    	</div>
					    </fieldset>
					</div>
				</div>
							

	 </div>
	{% endif %}
{%endblock%}
{% block script %}
<script type="text/javascript" src="/media/js/addclasskillclass.js"></script>
<script type="text/javascript" src="/media/js/attachevent.js"></script>
<script type="text/javascript" src="/media/js/addcss.js"></script>
<script type="text/javascript" src="/media/js/tabtastic.js"></script> 
<script type="text/javascript" src="/media/js/jquery.autocomplete.js"></script>
<script src="/media/js/jquery.maskedinput-1.2.2.js" type="text/javascript"></script>
<script src="/media/js/swfupload.js" type="text/javascript"></script>
<script src="/media/js/swfupload.cookies.js" type="text/javascript"></script>
<script type="text/javascript" src="/media/js/swfupload.queue.js"></script>
<script type="text/javascript" src="/media/js/swfileprogress.js"></script>
<script type="text/javascript" src="/media/js/swfhandlers.js"></script>
{% if cihazform %}
<script type="text/javascript" src="/media/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/media/js/jquery.multiselect.min.js"></script>
<script type="text/javascript" src="/media/js/jquery.multiselect.filter.js"></script>
{% endif %}
<link rel="stylesheet" type="text/css" href="/media/css/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="/media/css/swfuploads.css" />
<link rel="stylesheet" type="text/css" href="/media/css/jquery.multiselectfilter.css">

<script language="javascript" type="text/javascript">
    var swfupload,upload1,xaciklama;
	
	var myCustomUploadStartEventHandler = function (file) 
	{ 
		try{
	  		var xaciklama;
	  		xaciklama=document.getElementById("id_aciklama_belge").value;
			this.addPostParam('aciklama', xaciklama);
		
			var progress = new FileProgress(file, this.customSettings.progressTarget);
			progress.setStatus("Uploading...");
			progress.toggleCancel(true, this);
		}
		catch (ex) {
			alert(ex)
		}
		
		return true; 
	}; 
    /*window.onload = function() {
      swfupload = new SWFUpload({
        debug: false,

        upload_url: "/worklist/sabitler/coklu_belge_ekle/",
        flash_url: "/media/swf/swfupload.swf",

        button_placeholder_id: "upload_btn",
        button_width: "40",
        button_height: "16",
        button_cursor: SWFUpload.CURSOR.HAND,
        button_text: "Click",

        file_dialog_complete_handler: function() { this.startUpload(); },
        upload_complete_handler: function() { this.startUpload(); },
      });
    };

    var upload1, upload2;
 */
	window.onload = function() {
	 
		upload1 = new SWFUpload({
			// Backend Settings
			upload_url: "/worklist/sabitler/coklu_belge_ekle/",
			// File Upload Settings
			file_size_limit : "102400",	// 100MB
			file_types : "*.*",
			file_types_description : "All Files",
			file_upload_limit : "30",
			file_queue_limit : "0",

			// Event Handler Settings (all my handlers are in the Handler.js file)
			file_dialog_start_handler : fileDialogStart,
			file_queued_handler : fileQueued,
			file_queue_error_handler : fileQueueError,
			file_dialog_complete_handler : fileDialogComplete,
			upload_start_handler :  myCustomUploadStartEventHandler,
			upload_progress_handler : uploadProgress,
			upload_error_handler : uploadError,
			upload_success_handler : uploadSuccess,
			upload_complete_handler : uploadComplete,

			// Button Settings
			button_image_url : "/media/images/ButtonUploadText_61x22.png",
			button_placeholder_id : "spanButtonPlaceholder1",
			button_width: 61,
			button_height: 22,
			
			// Flash Settings
			flash_url: "/media/swf/swfupload.swf",
			

			custom_settings : {
				progressTarget : "fsUploadProgress1",
				cancelButtonId : "btnCancel1"
			},
			post_params : { "cihazid" : "{{cihazform.id.data}}"},
			// Debug Settings
			debug: false
		});
	};
  </script>

<script type="text/javascript">
jQuery(function($){
		
	   $("#id_baslangic_tarihi").mask("9999-99-99",{placeholder:" "});
	   $("#id_bitis_tarihi").mask("9999-99-99",{placeholder:" "});
	   {% if doclist %}
	   $("#id_cihaz").multiselect({
		   						   minWidth: "auto",
					 }).multiselectfilter();
	   {% endif %}
	   	   
	
});

</script>

<link rel="stylesheet" type="text/css" href="/media/css/tabtastic.css" />
<link rel="stylesheet" type="text/css" href="/media/css/autocomplete.css" />
<script language="javascript">
function ekle() {
xvar = document.getElementById("id_cihaz_id");

window.location.href = "ekle/?cid="+xvar.value;

}

function bakimformtaslaktanekle() {
	xvar = document.getElementById("id_kayitli_taslaklar");

	window.location.href = "/worklist/sabitler/{{ s.id }}/{{ cihazform.id.data }}/bakimform/ekle/?tasid="+xvar.value;

	}

function bakimformtaslak(pageURL, title,w,h) {
	var mydomain=window.location.href.match(/:\/\/(.[^/]+)/)[1];
	//alert(mydomain);
	var pageURL="http://"+mydomain+"/"+pageURL;
	//alert("2 : "+pageURL);
	
	var left = (screen.width/2)-(w/2);
	var top = (screen.height/2)-(h/2);
	var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);

}



</script>

<script language="javascript">


function bakimformtaslakedit(pageURL, title,w,h) {
	
	var mydomain=window.location.href.match(/:\/\/(.[^/]+)/)[1];
	//alert(mydomain);
	var xtas_id = document.getElementById("id_kayitli_taslaklar");

	if (xtas_id.value > 0)
	{	
		var pageURL="http://"+mydomain+"/worklist/sabitler/bakim/taslak/"+xtas_id.value+"/degistir/";
	//alert("2 : "+pageURL);
	}
	else
	{
		alert("Taslak seçmelisiniz..");
		return 0;
	}
	var left = (screen.width/2)-(w/2);
	var top = (screen.height/2)-(h/2);
	var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);

}
</script>
<script language="javascript">
function PopupCenter(pageURL, title,w,h) {
	var mydomain=window.location.href.match(/:\/\/(.[^/]+)/)[1];
	//alert(mydomain);
	var pageURL="http://"+mydomain+"/"+pageURL;
	//alert("2 : "+pageURL);
	
	var left = (screen.width/2)-(w/2);
	var top = (screen.height/2)-(h/2);
	var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);

}
</script>
<script type="text/javascript">
window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";
</script>
<script type="text/javascript">


  var a1;
  var a2;
  jQuery(function() {

	
    var onAutocompleteSelect = function(value, data) {
      $('#selection').html('<img src="\/global\/flags\/small\/' + data + '.png" alt="" \/> ' + value);
      //alert(data);
    }

    var options_aciklama = {
      serviceUrl: '/worklist/sabitler/tanimlama/service/ajax/autocomplete/aciklama/?sid={{s.id}}',
      width: 300,
      delimiter: /(,|;)\s*/,
      onSelect: onAutocompleteSelect,
      deferRequestBy: 0, //miliseconds
      params: { country: 'Yes' },
      noCache: false //set to true, to disable caching
    };

    var options_modeli = {
    	      serviceUrl: '/worklist/sabitler/tanimlama/service/ajax/autocomplete/modeli/?sid={{s.id}}',
    	      width: 300,
    	      delimiter: /(,|;)\s*/,
    	      onSelect: onAutocompleteSelect,
    	      deferRequestBy: 0, //miliseconds
    	      params: { country: 'Yes' },
    	      noCache: false //set to true, to disable caching
    	    };
    
    a1 = $('#id_aciklama').devbAutocomplete(options_aciklama);
	a2 = $('#id_modeli').devbAutocomplete(options_modeli);
	
    $('#navigation a').each(function() {
      $(this).click(function(e) {
        var element = $(this).attr('href');
        $('html').animate({ scrollTop: $(element).offset().top }, 300, null, function() { document.location = element; });
        e.preventDefault();
      });
    });

    $("#id_demirbasno").mask("***-99999-**",{placeholder:" "});

  });
 

</script>
<script language="Javascript">
function AJAX() {
   var ajax = false;
   // Internet Explorer (5.0+)
   try {
    ajax = new ActiveXObject("Msxml2.XMLHTTP");  // yeni versiyon xmlhttp
   } catch (e) {
       try {
        ajax = new ActiveXObject("Microsoft.XMLHTTP");  // eski versiyon xmlhttp
      } catch (e) {
        ajax = false;
      }
    }
   // Mozilla ve Safari
   if ( !ajax && typeof XMLHttpRequest != 'undefined' ) {
     try{
        ajax = new XMLHttpRequest();
     }catch(e) {   
        ajax = false;
     }
    }
    // Diger
   if ( !ajax && window.createRequest ) {
          try{
        ajax = window.createRequest();
     }catch(e) { 
        ajax = false;
     }
    }
     return ajax;
}


function umdn_getir() {

	//var xelement = document.getElementById("ajaxloading");
	//var hidden_element= document.getElementById("sonucx");
	//element.innerHTML=random_num;
	var xcihaz = document.getElementById("id_aciklama");
	var xelement = document.getElementById("id_demirbasno");
    var xelvalue = xelement.value.trim()
	if (xelvalue.length <= 2)
	{
			ajax = new AJAX();
			ajax.open("GET", "/worklist/cihaz/umdn/?cihazadi="+xcihaz.value, true);
			ajax.onreadystatechange = function() {
					
					if (ajax.readyState == 4 && ajax.status == 200) 
					{
			
						xelement.value = "XXX-"+ajax.responseText+"-XX" ;
							
					}
			
			    }
				
			    ajax.send(null);
		
	}

	else
	{
		return 0;
	}
		
	
}
</script>
{{form.media}}
{%endblock%}
